# -*- coding: utf-8

import pickle, Map, Tile, Pic

def load(filename):
    f = open(filename,'rb')
    n = pickle.load(f)
    s = pickle.load(f)
    m = pickle.load(f)
    MAP = Map.Map(0,[[Tile.Tile(Pic.Pic(m[(x,y)][0]),m[(x,y)][1],m[(x,y)][2]) for y in range(s[1])] for x in range(s[0])])
    return(MAP)
